import React from 'react';
import './NavBar.scss';
import { NavBar as AntdNavBar } from 'antd-mobile';

interface NavBarProps {
  right?: React.ReactNode | string;
  back?: React.ReactNode | string | null;
  backIcon?: React.ReactNode | boolean;
  children?: React.ReactNode | string;
  onBack?:()=>void
}

const NavBar: React.FunctionComponent<NavBarProps> = ({ right, back,children,onBack }) => {
  return (
    <div className="nav-bar">
      <AntdNavBar back={back} right={right} children={children} onBack={onBack}></AntdNavBar>
    </div>
  );
};

export default NavBar;